﻿using System.Collections.Generic;
using System.Web;
using ltModel.Model;
using System.Text;
using System.Data.SqlClient;
using System;

namespace ltModel.DAL
{
/// <summary>
/// Summary description for ProjectTypeDAL
/// </summary>
    public class ProjectTypeDAL
    {
        public ProjectTypeDAL()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        /// <summary>
        /// Get project Type list
        /// </summary>
        public List<ProjectType> GetList()
        {
            List<ProjectType> listStreets = new List<ProjectType>();
            string strSql = "select * FROM lt_ProjectType";

            SqlDataReader dr = DataObject.ExecuteReader(strSql.ToString());
            ProjectType model = null;
            while (dr.Read())
            {
                model = new ProjectType();
                model.TypeID = Convert.ToInt32(dr["TypeID"]);
                model.TypeName = dr["TypeName"].ToString();
                listStreets.Add(model);
            }

            return listStreets;
        }
    }
}